<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改业主成员')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-rel-edit" th:object="${fzBuildingOwnerRoomRel}">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">业主ID：</label>
                <div class="col-sm-8">
                    <input name="ownerId" readonly="readonly" th:field="*{ownerId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">名字：</label>
                <div class="col-sm-8">
                    <input name="name" th:field="*{name}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">性别:</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_user_sex')}">
                        <input type="radio" th:id="${dict.dictCode}" name="sex" th:value="${dict.dictValue}" th:field="*{sex}" th:checked="${dict.default}">
                        <label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">电话：</label>
                <div class="col-sm-8">
                    <input name="phone" th:field="*{phone}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">身份证号：</label>
                <div class="col-sm-8">
                    <input name="numberId" th:field="*{numberId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">上传照片：</label>
                <div class="col-sm-8">
                    <input name="photo" th:field="*{photo}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">业主状态:</label>
                <div class="col-sm-8">
                <div class="radio-box" th:each="dict : ${@dict.getType('owner_state')}">
                    <input type="radio" th:field="*{state}" th:id="${dict.dictCode}" name="state" th:value="${dict.dictValue}" th:checked="${dict.default}">
                    <label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
                </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">备注</label>
                <div class="col-sm-8">
                    <input name="remark" th:field="*{remark}" class="form-control" type="text" >
                </div>
            </div>

        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "owner/rel";
        $("#form-rel-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-rel-edit').serialize());
            }
        }
    </script>
</body>
</html>